/*   1:    */ package com.atomikos.icatch.imp;
/*   2:    */ 
/*   3:    */ import com.atomikos.icatch.HeurCommitException;
/*   4:    */ import com.atomikos.icatch.HeurHazardException;
/*   5:    */ import com.atomikos.icatch.HeurMixedException;
/*   6:    */ import com.atomikos.icatch.HeurRollbackException;
/*   7:    */ import com.atomikos.icatch.HeuristicMessage;
/*   8:    */ import com.atomikos.icatch.Participant;
/*   9:    */ import com.atomikos.icatch.RollbackException;
/*  10:    */ import com.atomikos.icatch.StringHeuristicMessage;
/*  11:    */ import com.atomikos.icatch.SysException;
/*  12:    */ import java.util.Dictionary;
/*  13:    */ 
/*  14:    */ public class ReadOnlyParticipant
/*  15:    */   implements Participant
/*  16:    */ {
/*  17:    */   private static final long serialVersionUID = -2141189205744565090L;
/*  18:    */   StringHeuristicMessage[] msgs;
/*  19:    */   private final String coordinatorId;
/*  20:    */   
/*  21:    */   public ReadOnlyParticipant(CoordinatorImp coordinator)
/*  22:    */   {
/*  23: 56 */     this.coordinatorId = coordinator.getCoordinatorId();
/*  24: 57 */     this.msgs = new StringHeuristicMessage[1];
/*  25: 58 */     this.msgs[0] = new StringHeuristicMessage("ReadOnlyParticipant");
/*  26:    */   }
/*  27:    */   
/*  28:    */   public boolean recover()
/*  29:    */     throws SysException
/*  30:    */   {
/*  31: 62 */     return true;
/*  32:    */   }
/*  33:    */   
/*  34:    */   public String getURI()
/*  35:    */   {
/*  36: 67 */     return null;
/*  37:    */   }
/*  38:    */   
/*  39:    */   public void setCascadeList(Dictionary allParticipants)
/*  40:    */     throws SysException
/*  41:    */   {}
/*  42:    */   
/*  43:    */   public void setGlobalSiblingCount(int count) {}
/*  44:    */   
/*  45:    */   public int prepare()
/*  46:    */     throws RollbackException, HeurHazardException, HeurMixedException, SysException
/*  47:    */   {
/*  48: 82 */     return 0;
/*  49:    */   }
/*  50:    */   
/*  51:    */   public HeuristicMessage[] commit(boolean onePhase)
/*  52:    */     throws HeurRollbackException, HeurHazardException, HeurMixedException, RollbackException, SysException
/*  53:    */   {
/*  54: 88 */     return this.msgs;
/*  55:    */   }
/*  56:    */   
/*  57:    */   public HeuristicMessage[] rollback()
/*  58:    */     throws HeurCommitException, HeurMixedException, HeurHazardException, SysException
/*  59:    */   {
/*  60: 93 */     return this.msgs;
/*  61:    */   }
/*  62:    */   
/*  63:    */   public void forget() {}
/*  64:    */   
/*  65:    */   public HeuristicMessage[] getHeuristicMessages()
/*  66:    */   {
/*  67:102 */     return this.msgs;
/*  68:    */   }
/*  69:    */   
/*  70:    */   public boolean equals(Object o)
/*  71:    */   {
/*  72:108 */     boolean ret = false;
/*  73:109 */     if (((o instanceof ReadOnlyParticipant)) && (this.coordinatorId != null))
/*  74:    */     {
/*  75:110 */       ReadOnlyParticipant other = (ReadOnlyParticipant)o;
/*  76:111 */       ret = this.coordinatorId.equals(other.coordinatorId);
/*  77:    */     }
/*  78:113 */     return ret;
/*  79:    */   }
/*  80:    */   
/*  81:    */   public int hashCode()
/*  82:    */   {
/*  83:118 */     int ret = 1;
/*  84:119 */     if (this.coordinatorId != null) {
/*  85:119 */       ret = this.coordinatorId.hashCode();
/*  86:    */     }
/*  87:120 */     return ret;
/*  88:    */   }
/*  89:    */ }


/* Location:           C:\myfile\mysoft\apache-maven-3.5.0-bin\apache-maven-3.5.0\myrep\com\atomikos\transactions\3.7.0\transactions-3.7.0.jar
 * Qualified Name:     com.atomikos.icatch.imp.ReadOnlyParticipant
 * JD-Core Version:    0.7.0.1
 */